package com.shyroke.service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.jws.WebService;

import com.shyroke.bean.Role;
import com.shyroke.bean.User;

@WebService(endpointInterface = "com.shyroke.service.ILogin")
public class Login implements ILogin {

	/**
	 * 获取所有用户以及对应的角色
	 */
	public Map<String, List<Role>> getRoles() {
		Map<String, List<Role>> map = new HashMap<String, List<Role>>();

		List<Role> roleList1 = new ArrayList<Role>();
		roleList1.add(new Role(1, "架构师"));
		roleList1.add(new Role(2, "技术总监"));

		List<Role> roleList2 = new ArrayList<Role>();
		roleList2.add(new Role(3, "程序员"));

		map.put("张三", roleList1);
		map.put("李四", roleList2);

		return map;
	}

}
